]> dgit.raspbian.org Git - gnome-shell.git/commit
St: support css margin property
authorCarlos Soriano <carlos.soriano89@gmail.com>
Tue, 11 Nov 2014 14:04:46 +0000 (15:04 +0100)
committerCarlos Soriano <carlos.soriano89@gmail.com>
Wed, 19 Nov 2014 15:42:25 +0000 (16:42 +0100)
commit2935fd4ffe9176d28f68192bb34bdba1a0e57a2b
treebafa3f75e4ed25a4a66d6847ad03824fe4501602
parent5961f162fa773a5ffa7b99f43eef66affdaf723a
St: support css margin property

It's implemented similar to the padding property, but instead of taking
into account the margin values at drawing time in node-drawing, we set
the clutter actor margins in StWidget when the style is computed.

In the case that a CSS margin is not specified, we don't to set a value
of 0 to the clutter actor margin. In this manner it allows to use
Clutter margin values set in the code. However, the margins that are set
both in the code and in the CSS on the same side, the result is
unpredictable.

We avoid to set the clutter actor margin values to 0 if there's no CSS
margin values defined, so we still allow clutter actors to use margin
set in the code.

https://bugzilla.gnome.org/show_bug.cgi?id=728437
src/st/st-theme-node-private.h
src/st/st-theme-node.c
src/st/st-theme-node.h
src/st/st-widget.c
src/st/test-theme.c
src/st/test-theme.css